[toolchain] Harden installation failure handling and RapidJSON CMake support#7583
[toolchain] Harden installation failure handling and RapidJSON CMake support#7583QuantumMisaka wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Isn't it duplicated effort of leveraging RapidJSONConfig.cmake (including RapidJSONTargets.cmake)?? There should not be any other fallbacks since the target exported is (and should be) totally decided on the RapidJSON side!
If the system-installed package has a incomplete CMake configuration, for example, RapidJSON installed from |
| if(ENABLE_RAPIDJSON) | ||
| find_package(RapidJSON CONFIG REQUIRED) | ||
| abacus_add_feature_definitions(__RAPIDJSON) | ||
| target_link_libraries(abacus_external_deps INTERFACE RapidJSON) | ||
| include(cmake/AbacusRapidJSON.cmake) | ||
| abacus_configure_rapidjson(abacus_external_deps) | ||
| endif() |
There was a problem hiding this comment.
This breaks the modernlized target behavior and will most likely bring only issues.
Linked Issue
Fix #7565 #7566 #7569
Summary
This PR hardens the ABACUS toolchain installation flow for issues found during toolchain/install review.
Changes include:
Root Cause
The wrapper scripts could mask failures from lower-level installers or argument validation paths, making a failed install appear successful.
RapidJSON was installed as headers only, which left CMake package discovery fragile for builds that expect an installed package layout.
Validation
Validated on the SAI CPU-MISC/rush-cpu environment from commit
583c5dc66.Checks run:
toolchain/tests/test_wrapper_failure_propagation.shtoolchain/tests/test_installer_argument_failures.shtoolchain/tests/test_rapidjson_cmake.shtoolchain/toolchain_gnu.sh -j 2installation./build_abacus_gnu.sh -j 2with RapidJSON enabledexamples/02_scf/01_pw_Si2The final real calculation job was Slurm
619964, completed withExitCode=0:0, five SCF iterations (DS1-DS5), andTOTAL Time : 2in ABACUS output.Note: the full verification environment hit intermittent GitHub/proxy TLS EOFs while fetching some release tarballs. After supplying checksum-matching source archives, the same installation
continued and passed. These network failures also confirmed that wrapper-level failures now propagate as non-zero exits.